package com.sl.au.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.sl.au.interceptor.LoginInterceptor;

@Component
public class WebAppConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //super.addInterceptors(registry);no need
        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/**");
    }
}
